from itertools import islice


def dict_slice(adict, start, end):
    keys = adict.keys()
    dict_slice = {}
    for k in list(keys)[start:end]:
        dict_slice[k] = adict[k]
    return dict_slice


def test01():
    aa = list()
    aa.append("8886_1_1")
    aa.append("8886_1_2")
    aa.append("8886_2_1")
    aa.append("8886_2_2")
    aa.append("8886_-1_1")
    aa.append("8886_-1_2")
    aa.append("8886_-2_1")
    aa.append("8886_-2_2")
    aa.sort()
    print(aa)


def test02():
    a = "24"
    b = int(int(a) / 10)
    print(b)


def test03():
    a = '0'
    b = '4'
    print(a + b)


def test04():
    geo_wkt = "LINESTRING(119.715799186907 5.57745991739318 0,271.97378474391417 -0.2991213420063965 0,265.00106328591676 7.11629612197737 0)"
    geo_wkt = "LINESTRING(271.97378474391417 -0.2991213420063965 0,265.00106328591676 7.11629612197737 0)"
    geo_wkt = "POINT(113.23485355776795 23.00926480030635 -3.345143571428571)"
    point = geo_wkt[geo_wkt.find("(") + 1:geo_wkt.find(")")]
    x = point[:point.find(" ")]
    y = point[point.find(" ") + 1:point.rfind(" ")]
    print(x)
    print(y)


def test05():
    test_dict = {("a1", "a2"): ("a3", "a4"), ("b1", "b2"): ("b3", "b4")}
    for k in test_dict:
        print(k[0])


if __name__ == '__main__':
    test05()
